<template>
  <div class="MessageArea-container">
    <h3>{{ title }}</h3>
    <DataForm @submitData="postData" />
    <h3>评论列表({{List.total}})</h3>
    <DataList :list="List" />
    <div class="loading" v-loading='isLoading'></div>
</div>
</template>

<script>
import DataForm from "./DataForm";
import DataList from "./DataList";
export default {
  components: {
    DataForm,
    DataList,
  },
  props: ["List", "title",'isLoading'],
  methods: {
    postData(item, callback) {
      this.$emit("handleSubmit", item, callback);
    },
  },
};
</script>
<style scoped>
.loading{
  position: relative;
  width: 100%;
  height: 100px;
}
</style>